package corp.sunny.frameworks.dao;

import corp.sunny.frameworks.exception.DAOException;

/**
 * @File:BaseDAO.java
 * @Date:Jun 15, 2011
 * @Author:Subhash Bavi
 * 
 * @Description: generic DAO Interface for defining DAO methods
 * @Copyright Sunny Corporation - 2011
 */
public interface BaseDAO {

	/**
	 * method signatures for different database operations
	 */

	// Insert
	public void save(Object obj) throws DAOException;

	// Insert or Update
	public void saveOrUpdate(Object obj) throws DAOException;

	// Select based on id
	public Object load(Object obj) throws DAOException;

	// Select all from table
	public Object loadAll(Object obj) throws DAOException;

	// Select based on SQL Query
	public Object find(Object obj) throws DAOException;

	// Delete from table
	public void delete(Object obj) throws DAOException;
}
